//
//  InformationReportingTableDelegate.m
//  iPhoneMyRailApp
//
//  Created by Dinah Challen on 30/10/2008.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import "InformationReportingTableDelegate.h"


@implementation InformationReportingTableDelegate

@synthesize report;

- (id) init {
	self = [super init];
	
	if ( self ) {
		// No report
		self.report = @"";
	}
	
	return self;	
}

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    // Only one section so return the number of items in the list
    return 1;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
	return 420;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {   
    UITableViewCell *cell = (UITableViewCell *) [tableView dequeueReusableCellWithIdentifier:@"InformationDelegate"];
	
    if (cell == nil) {
		cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:@"InformationDelegate"] autorelease];
		
	}
	
	CGRect contentRect = CGRectMake(5, 5, 320, 40);
	UILabel *textView = [[UILabel alloc] initWithFrame:contentRect];
	textView.text = report;
	textView.numberOfLines = 3;
	textView.textColor = [UIColor grayColor];
	textView.adjustsFontSizeToFitWidth = YES;
	textView.font = [UIFont systemFontOfSize:18];
	[cell.contentView addSubview:textView];
	[textView release];	
   	
	return cell;
}


- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath  {
}

- (NSIndexPath *)tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath {
	return nil;
}



@end
